package com.irdstudio.apicenter.console.service.authenticate;

import java.sql.SQLException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.irdstudio.apicenter.console.dm.AppTblUser;
import com.irdstudio.apicenter.console.dm.AppTblUserDao;

@Service(value = "appTblUserService")
public class AppTblUserService {

	@Autowired
	private AppTblUserDao appTblUserDao;

	public int insertOne(AppTblUser appTblUser) throws SQLException,
			ClassNotFoundException {
		return appTblUserDao.save(appTblUser);
	}

	public AppTblUser queryAppTradePrivate(String recordKey) throws SQLException {
		return appTblUserDao.queryWithKeys(recordKey);
	}

	public int update(AppTblUser appTblUser) throws SQLException,
			ClassNotFoundException {
		return appTblUserDao.update(appTblUser);
	}

	public int delete(String recordKey) throws SQLException,
			ClassNotFoundException {
		return appTblUserDao.delete(recordKey);
	}
	
	public int updateUserPwd(AppTblUser appTblUser) throws SQLException,
			ClassNotFoundException {
		return appTblUserDao.updateUserPwd(appTblUser);
	}

}